<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored ="false"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>北京市电子行政监察平台-系统账号列表</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href="<%=path%>/css/base.css" rel="stylesheet" type="text/css" />
		<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
		<link href="<%=path%>/css/frame.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
			var path = "<%=path%>";
		</script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery-1.6.1.min.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery-jtemplates.pack.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery.form.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/core/jquery.history.pack.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/config/client-config.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/client-history.js"></script>
		<script type="text/javascript">
		 	//载入历史记录脚本
			loadHistoryScriptQueue(["table-history.js"]);
		</script>
		<script type="text/javascript" src="<%=path%>/javascript/config/config.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/util.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/oacore.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/table.js"></script>
		<script type="text/javascript" src="<%=path%>/javascript/system/init.js"></script>
		<script type="text/javascript">
			//创建一个新表格
			function createTable() {
				return new oacore.UI.Table({
					action: ACTIONS.ACCOUNT_LIST,
					tableUI: "table/account_list",
					parent: $("#dataTable"),
					pageProxy: setPageProxy,
					tableInitData: {
						path: path
					},
					sortProxy: sortProxy,
					advUICallback: function () {
						this.find(".use-date-picker").datepicker();
						$("#ui-datepicker-div").bind("click", function (event) {
								event.stopPropagation();
						});
					},
					callback: function () {
						//删除用户
						$(".delete-account-a").bind("click", function () {
							var roleId = this.id.split("_")[0];
							oacore.Widget.Dialog.confirm("用户删除确认", "您确认将此用户删除？", function () {
								$("#" + roleId + "_deleteAccount_form").ajaxSubmit({
										success: function (data) {
											dataTable.table.updateData();
										}
									});
							});
						});
					}
				});
			};
			
			//把创建表格方法引用赋给历史记录
			setTableCreator(createTable);

			function exportLog() {
				//IE兼容性问题，当js调用时，让IE记住【refer（既跳转前页面）】，
				// 当跳转前页面为null时，为用户直接从地址栏输入，系统不接受用户直接从地址栏输入
				oacore.Util.goUrl("/abc/?" + dataTable.getParams());
			};
		</script>
		<style type="text/css">
			div {
				position: static;
			}
		</style>
	</head>
	<body>
		<div id="mainPage" class="surround-layout">
			<jsp:include page="../frame/top.jsp" flush="true"></jsp:include>
			<div class="middle">
				<jsp:include page="../frame/middle_left.jsp" flush="true">
					<jsp:param value="1026-1027" name="view"/>
				</jsp:include>
				<!-- 右侧内容输出 -->
				<div class="right">
					<div class="right-all-content">
						<div class="content-line-wrap">
							<div class="content-line-left content-line">
								<h1 class="content-title">账号管理</h1>
								<button onclick="javascript: oacore.Util.goUrl('/web/toCreatePageAction.action');" class="special fun-create" id="createEvent">新增账号</button>
							</div>
							<div class="content-line-right content-line">
								<form onsubmit="search($('#searchValue').val());return false;">
									<input type="text" id="searchValue" class="shadow" name="searchCond"/>
									<input type="submit" id="searchButton" class="special table-search" value="搜索"/>
								</form>
							</div>
						</div>
						<div id="dataTable" class="right-content">
							读取列表中...
						</div>
					</div>
				</div>
				<!-- 右侧内容区 -->
			</div>
		</div>
	</body>
</html>